# -*- coding: UTF-8 -*-

import sqlite3
import os

def conn():
    path=os.path.join(os.getcwd(),'FUNDS.sql')
    connion=sqlite3.connect('test.db')
    connion.cursor()
    if os.path.exists(path):
        with open(path,'r',encoding='UTF-8') as file:
            file.seek(0)
            lines=file.read()
        try:
            connion.executescript(lines)
            connion.commit()
        except Exception as e:
            print(e)
        finally:
            connion.close()
    else:
        print('该文件不存在')

conn()